package com.teame.readbaby.parser;

import org.json.JSONException;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.teame.readbaby.util.Logger;
import com.teame.readbaby.vo.Userinfo;

public class UserInfoParser extends BaseParser<Userinfo> {

	@Override
	public Userinfo parseJSON(String paramString) throws JSONException {
		String result = checkResponse(paramString);
		if (result == null) {
			return null;
		}

		JSONObject jsonObject = JSONObject.parseObject(paramString);
		String jasonUserInfo = jsonObject.getString("userinfo");
		Userinfo userInfo  = JSON.parseObject(jasonUserInfo, Userinfo.class);
		return userInfo;
	}

}
